package com.rybbaby.tss.platform.sysHandlePermissions.service;

import com.rybbaby.tss.core.web.service.IBaseService;
import com.rybbaby.tss.platform.sysHandlePermissions.entity.SysHandlePermissions;

import java.util.List;
import java.util.Map;


/**
 * @author 谢进伟
 * @description 操作权限数据库操作服务接口
 * @createDate 2016-11-23 下午11:02:13
 */
public interface ISysHandlePermissionsService extends IBaseService<SysHandlePermissions> {

    /**
     * 管理员Id 数据源
     *
     * @return
     */
    public abstract List<Map<String, Object>> adminUserPermissionAllotIdDatasource();

    /**
     * 角色Id 数据源
     *
     * @return
     */
    public abstract List<Map<String, Object>> rolePermissionAllotIdDatasource();

    /**
     * 菜单权限添加常用的操作权限
     *
     * @param menuId      菜单权限Id
     * @param loginUserId 当前登陆用户Id
     * @throws Exception
     */
    public void initMenuDefaultHandle(String menuId, String loginUserId) throws Exception;

    public void deleteEntityById(String id);

    List<SysHandlePermissions> saveHandlePermissionAllot(String menuPermissionId, String objType, String objId, String[] handlePermissionIds, String loginUserId) throws Exception;
}
